<{extend name="../template/_article_base.html"}>

<{block name="seo"}>
<?php $article_cate = db('article_cate')->where('id',$cate_id)->find(); ?>
<?php
    $seo_description = empty($article_cate['seo_desc'])?$config['seo_description']:$article_cate['seo_desc'];
    $seo_keywords = empty($article_cate['seo_keywords'])?$config['seo_keywords']:$article_cate['seo_keywords'];
    $seo_title = $article_cate['title'];
?>

<meta name="keywords" content="<{$seo_keywords}>" />
<meta name="description" content="<{$seo_description}>" />
<title><{$seo_title}></title>
<{/block}>

<{block name="body_main"}>
<?php $articles =db('article')->where(['cid'=>$cate_id])->paginate(10);?>

<div class="main wrap">
    <div class="mainbody">
        <div class="listnav">
            <h1><a href="http://ecms154.99yuanma.net:8889/cygs"><{$article_cate['title']}></a></h1>
            <div class="subcate"> </div>
            <span><{$article_cate['seo_desc']}></span>
        </div>
        <div class="list">
            <ul id="infinitescroll">

                <?php foreach($articles as $key => $val) { ?>
                <li class="infinitescroll_li">
                    <div class="img">
                        <a href="<?php echo url('index/article/detail',['id'=>$val['id']]); ?>" title="<{$val.title}>">

                            <?php if(empty($article['cover'])){ ?>
                            <img src="/static/images/logo.png" alt="<{$val.title}>">
                            <?php }else{ ?>
                            <img src="<{$val.cover}>" alt="<{$val.title}>">
                            <?php } ?>
                        </a>
                    </div>
                    <div class="info">
                        <h3>
                            <a href="<?php echo url('index/article/detail',['id'=>$val['id']]); ?>" title="<{$val.title}>"><{$val.title}></a></h3>
                        <p><{$val.desc}></p>
                        <span> <a href=""> <img src="/static/images/logo.png" alt="<{$val.auth}>"><{$val.auth}></a> </span> <span><i class="fa fa-clock-o"></i><?php echo date('Y-m-d H:i',$val['add_time']); ?></span> <span><i class="fa fa-eye"></i><{$val.pv}>浏览</span> <span><i class="fa fa-commenting"></i><{$val.comments}></span> </div>
                </li>
                <?php } ?>

            </ul>
        </div>
        <?php echo $articles->render(); ?>
    </div>

</div>

<{/block}>


